-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Add a validation API to DeleteFiles which validates files exist prior to attempting to deletion. #8525
Merged
amogh-jahagirdar
merged 1 commit into
apache:master
from
amogh-jahagirdar:fix-delete-validation
Sep 21, 2023
Merged
Core: Add a validation API to DeleteFiles which validates files exist prior to attempting to deletion. #8525
amogh-jahagirdar
merged 1 commit into
apache:master
from
amogh-jahagirdar:fix-delete-validation
Sep 21, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rdblue
reviewed
Sep 19, 2023
rdblue
reviewed
Sep 19, 2023
rdblue
reviewed
Sep 19, 2023
amogh-jahagirdar
force-pushed
the
fix-delete-validation
branch
2 times, most recently
from
September 20, 2023 22:10
ac725f3
to
77fbb4a
Compare
rdblue
reviewed
Sep 20, 2023
rdblue
approved these changes
Sep 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I think it's good to merge when @RussellSpitzer's concern has been addressed. I think that the test has been rewritten, but you guys can confirm.
amogh-jahagirdar
force-pushed
the
fix-delete-validation
branch
from
September 20, 2023 23:10
77fbb4a
to
111e9fb
Compare
prior to attempting to deletion. Simplify/improve the validation check Use failMissingDeletePaths, more simplification
amogh-jahagirdar
force-pushed
the
fix-delete-validation
branch
from
September 21, 2023 18:26
111e9fb
to
172bab7
Compare
RussellSpitzer
approved these changes
Sep 21, 2023
Thanks all for the patient reviews, merging! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently there is no validation on delete files API for verifying that the file to be deleted actually exists prior to the commit. This can cause unexpected behavior, for example:
1.) Rewrite Data files compacts FILE_A + some delete files
2.) Concurrently a DeleteFiles call was done for FILE_A.
3.) Deletion gets retried after 1 completes. At the point it retries, FILE_A no longer exists due to the compaction so the deletion is a no-op.
From a user's perspective when they go and query the table after 3, they'll still see the contents of FILE_A, even though the wouldn't expect it since they received a successful delete of FILE_A.
This change currently adds a new validation API as opposed to changing the behavior to always do strict validation for purpose of backwards compatibility. I wanted to open this up and discuss with the community to see about if we want the new API or if we just want to change this behavior since it's mainly just used by maintenance procedures and I'm not sure where the current behavior would be desired.
Also I'd need to compare what serializable isolation vs snapshot isolation should guarantee in this concurrent delete scenario.